<template>
  <div class="pagination">
    <el-pagination
      background
      layout="prev, pager, next, total"
      :total="total"
    />
  </div>
</template>

<script setup>
import EventBus from "@/utils/eventBus";
import { onMounted, ref } from "vue";
const total = ref('')
onMounted(() => {
  EventBus.on('total', (val) => {
    total.value = val
  })
})
</script>

<style lang="scss" scoped>
// 分页
.pagination {
  margin-top: 30px;
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 50px;
}
</style>